import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/attachment/catalogue/getList',
    method: 'post',
    data: query
  })
}

export function fetchCatalogueAvailable(query) {
  return request({
    url: '/attachment/catalogue/getAvailable',
    method: 'post',
    data: query
  })
}

export function fetchArticle(id) {
  return request({
    url: '/attachment/catalogue/getDetail',
    method: 'post',
    data: { id }
  })
}

export function saveCatalogue(id) {
  return request({
    url: '/attachment/catalogue/save',
    method: 'post',
    data: id
  })
}

export function removeCatalogueByID(id) {
  return request({
    url: '/attachment/catalogue/delete',
    method: 'post',
    data: id
  })
}

export function changeCatalogueStatusByID(id) {
  return request({
    url: '/attachment/catalogue/change-status',
    method: 'post',
    data: { id }
  })
}

